import { defineConfig,loadEnv,mergeRsbuildConfig  } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';

const { publicVars } = loadEnv();

export default defineConfig({
  source:{
    define:publicVars
  },
  plugins: [pluginReact()],
  // 将src替换为@
  server: {
    proxy: {
      '/dev_api': {
        target: 'http://localhost:8080',
        // 允许跨域
        changeOrigin: true,
        pathRewrite: {
          '^/dev_api': '',
        },
      },
    },
  },
});
